package com.bdqn.t320.ch12;

import org.junit.Before;
import org.junit.Test;
import org.springframework.boot.test.context.SpringBootTest;
import redis.clients.jedis.Jedis;


@SpringBootTest
//@RunWith(SpringRunner.class)
public class JedisTester {

    private Jedis jedis;

    @Before
    public void setup() {
        jedis = new Jedis("127.0.0.1", 6379);
        System.out.println("链接成功");
    }

    @Test
    public void test1() {
        System.out.println("1");
        jedis.set("nn","nn");
        System.out.println("2");
    }

    @Test
    public void test2() {
        jedis.set("nnn","nnn");
    }
}
